import Mock from "mockjs";

Mock.mock("/api/getTable", "get", {
  code: 200,
  msg: "success",
  data: {
    1: [
      {
        area: "良信园区",
        date: "2023-03-01",
        jDate: "7607.0",
        fDate: "6153.0",
        pDate: "14246.0",
        gDate: "12125.0",
        qDate: "1968.0",
        all: "42099.0",
      },
      {
        area: "良信园区",
        date: "2023-03-02",
        fDate: "12736.0",
        pDate: "18986.0",
        gDate: "10844.0",
        all: "42566.0",
      },
      {
        area: "良信园区",
        date: "2023-03-03",
        fDate: "12277.0",
        pDate: "19171.0",
        gDate: "11772.0",
        all: "43220.0",
      },
      {
        area: "良信园区",
        date: "2023-03-04",
        fDate: "10602.0",
        pDate: "16497.0",
        gDate: "11143.0",
        all: "38242.0",
      },
      {
        area: "良信园区",
        date: "2023-03-05",
        fDate: "8651.0",
        pDate: "14171.0",
        gDate: "10117.0",
        all: "32999.0",
      },
      {
        area: "良信园区",
        date: "2023-03-06",
        fDate: "11468.0",
        pDate: "17462.0",
        gDate: "10365.0",
        all: "39295.0",
      },
    ],
    5: [
      {
        area: "电源进线",
        date: "2023-03-01",
        jDate: "671.0",
        fDate: "412.0",
        pDate: "1139.0",
        gDate: "631.0",
        qDate: "179.0",
        all: "3032.0",
      },
      {
        area: "电源进线",
        date: "2023-03-02",
        fDate: "1041.0",
        pDate: "1490.0",
        gDate: "566.0",
        all: "3097.0",
      },
      {
        area: "电源进线",
        date: "2023-03-03",
        fDate: "954.0",
        pDate: "1579.0",
        gDate: "546.0",
        all: "3079.0",
      },
      {
        area: "电源进线",
        date: "2023-03-04",
        fDate: "515.0",
        pDate: "789.0",
        gDate: "588.0",
        all: "1892.0",
      },
      {
        area: "电源进线",
        date: "2023-03-05",
        fDate: "424.0",
        pDate: "702.0",
        gDate: "511.0",
        all: "1637.0",
      },
      {
        area: "电源进线",
        date: "2023-03-06",
        fDate: "937.0",
        pDate: "1469.0",
        gDate: "624.0",
        all: "3030.0",
      },
    ],
  },
});

Mock.mock("/api/getTreeData", "get", {
  code: 200,
  msg: "success",
  data: [
    {
      id: 1,
      label: "良信园区",
      iconClass: "el-icon-edit",
      children: [
        {
          id: 2,
          label: "1号楼",
          children: [
            {
              id: 3,
              label: "6#配电房",
              children: [
                {
                  id: 4,
                  label: "6L1配电柜",
                  children: [
                    {
                      id: 5,
                      label: "电源进线",
                    },
                  ],
                },
                {
                  id: 6,
                  label: "6L2电容主柜",
                  children: [
                    {
                      id: 7,
                      label: "6L2",
                    },
                  ],
                },
                {
                  id: 8,
                  label: "6L3电容辅柜",
                  children: [
                    {
                      id: 9,
                      label: "6L3",
                    },
                  ],
                },
              ],
            },
          ],
        },
      ],
    },
  ],
});

Mock.mock("/api/getChartData", "get", {
  code: 200,
  msg: "success",
  data: {
    1: {
      jData: [7607, 0, 0, 0, 0, 0],
      fData: [6153, 12736, 12277, 10602, 8561, 11468],
      pData: [14246, 18986, 19171, 16497, 14171, 17462],
      gData: [12125, 10844, 11772, 11143, 10177, 10365],
      qData: [1968, 0, 0, 0, 0, 0],
      all: [42099, 42566, 43220, 38242, 32999, 39295],
    },
    5: {
      jData: [671, 0, 0, 0, 0, 0],
      fData: [412, 1041, 954, 515, 424, 937],
      pData: [1139, 1490, 1579, 789, 702, 1469],
      gData: [631, 565, 546, 588, 511, 624],
      qData: [179, 0, 0, 0, 0, 0],
      all: [3032, 3097, 3079, 1892, 1637, 3031],
    },
  },
});
